package com.maven.springmvc.service;


import com.maven.springmvc.mapper.MessageMapper;
import com.maven.springmvc.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubmitService {

    @Autowired
    MessageMapper messageMapper;

    public boolean submit(MessageInfo message) {
        messageMapper.insertMessage(message);
        return true;
    }


    public List<MessageInfo> getMessage() {
        return messageMapper.selectMessage();
    }
}
